home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
cnet
/
cn305c_2.lha
/
programming
/
README!
< prev
next >
Wrap
Text File
|
1994-01-28
|
3KB
|
71 lines
The files in this subdirectory have been provided for C programmers to
create their own C programs for use while ONLINE CNet AMIGA. Some
knowledge of the C language is required to make any use of these files.
CNet was compiled with the SAS/C v6.2 compiler. Although the
files on this disk are easily used with any other compiler, compiler-
specific features have been used where necessary.
Here's a description of the files provided here:
CNET.H
This is CNet's main "HEADER" file. It contains definitions of all
structures and variable types as used throughout CNet.
CNETFUNCS.H
This file contains ANSI prototypes for all CNet's internal functions. Only
a handful of these may be used as call-backs to the main program while your
program is running.
MINREXX.H
This file contains the AREXX interface structures. This will be of little
use to most C programmers but is provided for completeness.
XPROTO.H
This file contains the structure definitions and function prototypes for
CNet's XPR protocol interface. This will provided for completeness.
EMPTY.C
A bare-bones program shell which provides the machinery for getting in and
out of the external program. It contains call back routines for ALL of the
call-back functions that are currently supported.
INS.C
This is the pre-compiler include file. All include files are requested
here. This will be used to create a pre-compiled header file for fast
compilation.
How to compile a program using SAS/C v6.2:
First, create the pre-compiled Global Symbol Table "i" by using the command:
sc MAKEGST i ins
You need only do this once. It must only be repeated if any of the above
".H" files change. Next, compile your program using:
sc GST=i GSTIMM PARMS=REG NOSTKCHK CPU=ANY COMNEST LINK empty
where you replace "empty" with the actual name of your program.
Notes:
While your C pfile is running, you have access to ALL of CNet's variables.
The variable 'z' provides a pointer to the current port's PortData
structure (see CNET.H). The variable 'myp' provides a pointer to the
system's MainPort structure (again, see CNET.H). As an example, to
display the current user's name, the code:
PutText( z->user1.Handle );
is effective. To display what the user on port 1 is doing, the code:
PutText( myp->PortZ[1]->MyDoing );
will work--this assumes there IS someone on port 1!
Programming in CNet's C environment provides you with a lot of power. If
you have questions about specific variables, feel free to contact the
support BBS as noted in the manual.